#ifndef CmdFactoryH
#define CmdFactoryH
#include "CmdRead.h"

class CmdFactory
{
public:
	static CmdFactory& getInstance() 
	{
		static CmdFactory ins;
		return ins;
	}

	Command* createCmd(II2CRW *i2crw, VarMap *vmp, const std::string& cmd)
	{
		if (cmd == "read") 
		{
			return new CmdRead(i2crw, vmp, cmd);
		}

		return nullptr;
	}
	
private:
	CmdFactory() {}
};

#endif // !CmdFactoryH

